package com.pz.gulimall.auth.vo.res;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

public class ShopCarItemResVo {
    private String loginId;
    private Long skuId;
    private String skuName;
    private String skuDesc;

    /**
     * ["颜色:黑色", "版本:64GB"]
     */
    private List<String> saleAttrs;
    private String skuDefaultImg;
    private BigDecimal price;
    private int count;
    private BigDecimal totalPrice;
    private boolean hasStock;

    public ShopCarItemResVo() {
    }

    public List<String> getSaleAttrs() {
        return saleAttrs;
    }

    public void setSaleAttrs(List<String> saleAttrs) {
        this.saleAttrs = saleAttrs;
    }

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getSkuDesc() {
        return skuDesc;
    }

    public void setSkuDesc(String skuDesc) {
        this.skuDesc = skuDesc;
    }

    public String getSkuDefaultImg() {
        return skuDefaultImg;
    }

    public void setSkuDefaultImg(String skuDefaultImg) {
        this.skuDefaultImg = skuDefaultImg;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice() {
        this.totalPrice = this.price.multiply(BigDecimal.valueOf(getCount()));
    }

    public boolean isHasStock() {
        return hasStock;
    }

    public void setHasStock(boolean hasStock) {
        this.hasStock = hasStock;
    }
}
